Network camera, video monitoring system and method

ABSTRACT

The application provides a network camera, a video monitoring system and a method. The network camera comprises: an image sensor, a processor, a memory and a network communication interface; the processor is configured for matching a current image acquired by the image sensor with an image stored in a second storage unit of the memory, so as to obtain a similarity value representing a matching result, and storing an image satisfying a similarity condition in another storage unit of the network camera, reducing the difficulty of image comparison and improving the accuracy of the comparison result.

The present application is a national phase application under 35 U.S.C.§ 371 of International Application No. PCT/CN2020/109328 filed Aug. 14,2020, which claims the priority of a Chinese patent application No.201910808803.2, filed with the China National Intellectual PropertyAdministration on Aug. 29, 2019, and entitled “Network Camera, VideoMonitoring System and Method”, which are incorporated herein byreference in their entirety.

TECHNICAL FIELD

The present application relates to the technical field of videomonitoring, in particular to a network camera, a video monitoring systemand method.

BACKGROUND

Face images are acquired by a network camera of a video monitoringsystem and sent to a back-end server, and face comparison is performedby the back-end server. However, in the market, great hardware andsoftware differences in different types of network cameras, and greathardware and software differences in many back-end servers causeproblems that face comparison of the face images acquired by the networkcameras cannot be performed successfully on some back-end servers, orthe accuracy of comparison result is low.

SUMMARY

A first aspect of the present application provides a network cameraincluding an image sensor, a processor, a memory and a networkcommunication interface; the memory includes a first storage unit and asecond storage unit; the image sensor is configured for acquiring imagesof monitoring scenes; the first storage unit is configured for storingall images acquired by the image sensor, the second storage unit isconfigured for storing a part of the images acquired by the imagesensor, the part of the images is a subset of all images; the processoris configured for: matching a current image acquired by the image sensorwith an image stored in the second storage unit to obtain a similarityvalue representing a matching result, and comparing the similarity valuewith a first similarity threshold indicated externally and a secondsimilarity threshold indicated externally; when the similarity value isless than the first similarity threshold but greater than the secondsimilarity threshold, sending the current image to a server with amatching failure message through the network communication interface;when the similarity value is less than the first similarity thresholdand less than the second similarity threshold, sending the current imageto the server with the matching failure message through the networkcommunication interface, assigning a uniquely associated device targetidentifier to the current image, and storing the current image in thesecond storage unit; wherein the first similarity threshold is greaterthan the second similarity threshold, and the device target identifierfor the current image is generated based on a time when the currentimage is stored in the second storage unit, a flag number of the networkcamera and a random value.

A second aspect of the application provides a video monitoring systemincluding at least one network camera and a server, a communicationconnection between each camera and the server is established through anetwork; for any network camera in the at least one network device, thenetwork camera includes an image sensor, a first processor, a firstmemory and a first network communication interface, wherein the firstmemory includes a first storage unit and a second storage unit; theimage sensor is configured for acquiring images of monitored scenes; thefirst storage unit is configured for storing all images acquired by theimage sensor, the second storage unit is configured for storing a partof the images acquired by the image sensor, the part of the images is asubset of all images; the first processor is configured for: matching acurrent image acquired by the image sensor with an image stored in thesecond storage unit to obtain a similarity value representing a matchingresult, and comparing the similarity value with a first similaritythreshold indicated externally and a second similarity thresholdindicated externally, when the similarity value is less than the firstsimilarity threshold but greater than the second similarity threshold,sending the current image to the server with a matching failure messagethrough the first network communication interface, and when thesimilarity value is less than the first similarity threshold and lessthan the second similarity threshold, sending the current image to theserver with the matching failure message through the networkcommunication interface, assigning a uniquely associated device targetidentifier to the current image, and storing the current image in thesecond storage unit, wherein the first similarity threshold is greaterthan the second similarity threshold, and the device target identifieris generated based on a time when the current image is stored in thesecond storage unit, a flag number of the network camera and a randomvalue; wherein the server includes a second network communicationinterface, a second processor and a second memory; the second processoris configured for receiving the matching failure message sent by thenetwork camera through the second network communication interface,judging whether there is an image in the second memory whose devicetarget identifier is consistent with the device target identifier forthe current image, if there is no image in the second memory whosedevice target identifier is consistent with the device target identifierfor the current image, assigning a uniquely associated platform targetidentifier to the current image, establishing a correspondence betweenthe device target identifier and the matching failure message, andstoring the platform target identifier and the correspondence; if thereis an image in the second memory whose device target identifier isconsistent with the device target identifier for the current image,obtaining a platform target identifier for the matching imagecorresponding to the current image in the second memory, establishing amapping relationship between the device target identifier and theplatform target identifier, and storing the mapping relationship in thesecond memory.

A third aspect of the application provides a method for updating a facedatabase in a camera including: acquiring a captured face image inresponse to a face capture instruction; matching the captured face imagewith any face image in the face database stored locally by the cameraaccording to the face database, and calculating a similarity value ofthe captured face image; wherein, at least two face images are stored inthe face database, and each face image uniquely corresponds to anidentification number; wherein the identification number is used toindicate a time when the face image corresponding to the identificationnumber is stored in the face database; and the identification numbercorresponds to a frequency value that is used to indicate the number ofsuccessful matches for the face image corresponding to theidentification number; when the similarity value of the captured faceimage is greater than a first threshold, determining a successful match,and obtaining a face image with the highest similarity value to thecaptured face image in the face database, a first identification numbercorresponding to the face image and a frequency value corresponding tothe first identification number; when the frequency value correspondingto the first identification number is less than a preset threshold,deleting the face image corresponding to the first identification numberin the face database in the camera and updating the face database in thecamera.

A fourth aspect of the application provides a method for associating aface database in a camera with a face database in a server, including:the camera acquires a captured face image in response to a face captureinstruction; the camera matches the captured face image with any faceimage in the face database stored locally by the camera according to theface database and calculates a similarity value of the captured faceimage; wherein, at least two face images are stored in the facedatabase, and each captured face image uniquely corresponds to anidentification number; wherein, the identification number is used toindicate a time when a face image corresponding to the identificationnumber is stored in the face database in the camera; and theidentification number corresponds to a frequency value that is used toindicate the number of successful matches for the face imagecorresponding to the identification number; when the similarity value ofthe captured face image is greater than a first threshold, the cameradetermines a successful match, and obtains a face image with the highestsimilarity value to the captured face image in the face database and afirst identification number corresponding to the face image; and sendingthe first identification number and the captured face image to theserver; according to the received first identification number, theserver compares the captured face image with the face database in theserver in response to the first identification number being received forthe first time, wherein each face image in the face database in theserver uniquely corresponds to a second identification number; after thecaptured face image is successfully compared with the face image in theserver, the server obtains a face image in the server with the highestsimilarity value to the captured face image and the corresponding secondidentification number; the server creates an association relationshipbetween the first identification number and the second identificationnumber, and the association relationship is used to associate the facedatabase in the camera with the face database in the server.

In the embodiments of present application, the images acquired by thenetwork camera are processed by its own processor, and the acquiredimages are stored in a targeted manner according to the processedresults, which not only reduces the difficulty of image comparison, butalso improves the accuracy of comparison results, furthermore, thenetwork camera sends the processed results of the image to the serverwithout the image comparison performed by the server, thus solving theproblems that the face images acquired by the network camera cannot besuccessfully compared on some back-end servers or the accuracy ofcomparison results is low.

BRIEF DESCRIPTION OF THE DRAWINGS

In order to explain the technical solution of the embodiments of thepresent application and the prior art more clearly, drawings used in theembodiments and the prior art will be briefly described below.Obviously, the drawings in the following description are for only someembodiments of the present application, and other drawings could beobtained according to these drawings without any creative efforts forthose skilled in the art.

FIG. 1 is a schematic structural diagram of a network camera accordingto an embodiment of the present application;

FIG. 2 is a schematic flow chart of the network camera in the embodimentshown in FIG. 1 storing captured images in a second storage unit;

FIG. 3 is a schematic diagram of an implementation of the network camerain the embodiment shown in FIG. 1 uploading the captured images to aserver;

FIG. 4 is an interface diagram of attribute setting of the secondstorage unit;

FIG. 5 is a schematic diagram of an implementation of deleting an imagein the second storage unit;

FIG. 6 is a schematic diagram of detailed information of a target imagein the second storage unit displayed by a display device;

FIG. 7 is a schematic design diagram of a human-computer interactioninterface of a display device;

FIG. 8 is a schematic structural diagram of a video monitoring systemaccording to an embodiment of the present application;

FIG. 9 is a flow diagram of a first embodiment of a method for updatinga face database in a camera provided by the present application;

FIG. 10 is a flow diagram of a second embodiment of a method forupdating a face database in a camera provided by the presentapplication; and

FIG. 11 is a flow diagram of an embodiment of a method for associating aface database in a camera with a face database in a server provided bythe present application.

DETAILED DESCRIPTION

In order to make the purpose, technical solution and advantages of theapplication clearer, the application will be further described in detailwith reference to the drawings and embodiments. It is obviously that thedescribed embodiments are only some of the embodiments of the presentapplication instead of all of them. Based on the embodiments in thepresent application, all other embodiments obtained by those skilled inthe art without any creative efforts are within the protection scope ofthe present application. The technical solution of the presentapplication will be described in detail with the following specificembodiments. The following embodiments could be combined with eachother, and they can refer to each other for the same and similarconcepts or processes.

FIG. 1 is a schematic structural diagram of a network camera accordingto an embodiment of the present application. As shown in FIG. 1 , thenetwork camera according to the embodiment of the present applicationmay include an image sensor 11, a processor 12, a memory 13 and anetwork communication interface 14. The memory 13 includes a firststorage unit 131 and a second storage unit 132.

In the embodiment of the present application, the image sensor 11 isconfigured for acquiring images of a monitored scene.

The first storage unit 131 is configured for storing all images acquiredby the image sensor 11, and the second storage unit 132 is configuredfor storing a part of the images acquired by the image sensor 11, thepart of the images is a subset of all images described above.

The processor 12 is configured for matching a current image acquired bythe image sensor 11 with images stored in the second storage unit 132 toobtain a similarity value representing a matching result, and comparingthe similarity value with a first similarity threshold indicatedexternally and a second similarity threshold indicated externally, whenthe similarity value is less than the first similarity threshold butgreater than the second similarity threshold, sending the current imageto a server with a matching failure message through the networkcommunication interface 14, and when the similarity value is less thanthe first similarity threshold and less than the second similaritythreshold, sending the current image to the server with a matchingfailure message through the network communication interface 14, andassigning a uniquely associated device target identifier to the currentimage, and storing the current image in the second storage unit 132.

The first similarity threshold is greater than the second similaritythreshold, and the device target identifier for the current image isgenerated based on a time when the current image is stored in the secondstorage unit 132, a flag number of the network camera and a randomvalue.

The first similarity threshold and the second similarity thresholdindicated externally refer to a preset first similarity threshold and apreset second similarity threshold. Of course, the first similaritythreshold and the second similarity threshold may also be adjustedaccording to an instruction input by the user. Those skilled in the artmay understand that the first storage unit 131 cannot store imagesindefinitely due to the capacity limitation of the first storage unit131. In the embodiment of the present application, the first storageunit 131 is configured for storing all images acquired by the imagesensor 11, which means that all images acquired by the image sensor 11will be sent to the first storage unit 131 for storage, and after thefirst storage unit 131 is full, the earliest stored image may beoverwritten or the first storage unit 131 may be replaced with a newone, and so on.

Optionally, the matching failure message and a matching success messagedescribed below may be uploaded through fields of different protocols,so that the server may distinguish matching results when the networkcamera performs upload.

For example, a specified field may be set in a header of a message todistinguish the matching results. The specified field in the matchingfailure message is a first character (for example, 0), and the specifiedfield in the matching success message is a second character (forexample, 1). The matching results may be distinguished by identifyingthe character in the specified field.

Optionally, in the embodiment, by the image sensor 11, the networkcamera acquires images of the monitored scene in which the networkcamera is located, for example, when a lens of the network camera isjust focused on a face, the current image containing the face iscaptured by the image sensor 11. On the one hand, the image sensor 11transmits the current image to the first storage unit 131 for storage;on the other hand, the processor 12 matches the current image withimages stored in the second storage unit 132 by analyzing the facefeatures in the current image and the face features of the image storedin the second storage unit 132 with a face detection technology toobtain a matching result, which includes a similarity value between thecurrent image and the stored image.

The similarity value between the current image and the stored image mayinclude all similarity values between the current image and all imagesstored in the second storage unit 132, or the similarity value betweenthe current image and the stored image may be a maximum similarity valueamong all similarity values, which is not limited by the embodiment ofthe present application and may be customized according to an actualsituation.

As an example, the processor 12 first matches the similarity value withthe first similarity threshold indicated externally, and determines amatching result. The first similarity threshold is used to judge whetherthe current image is successfully matched with an image in all images inthe second storage unit 132.

In the embodiment, if the similarity value between the current image andeach of the images stored in the second storage unit 132 is less thanthe first similarity threshold, it indicates that there is no image inthe second storage unit 132 whose content is consistent with content ofthe current image (the content in the present application refers to aconcerned object, such as a face, a human body or a vehicle, etc.),further, in order to ensure the synchronization between the networkcamera and the image stored in the server (i.e., the back-end server inthe video monitoring system), on the one hand, the current image may besent to the server with a matching failure message through the networkcommunication interface 14, the matching failure message is used toindicate that the current image fails to match in the network camera,that is, there is no image whose content is consistent with the contentof current image, among the images previously captured by the networkcamera, so that the server may perform corresponding processing.

On the other hand, in order to ensure the uniqueness of the imagesstored in the second storage unit 132, the processor 12 may also matchthe similarity value with the second similarity threshold indicatedexternally, to judge whether the current image meets a condition ofbeing stored in the second storage unit 132. The second similaritythreshold is used to judge whether to store the current image in thesecond storage unit 132. In the embodiment, the first similaritythreshold is greater than the second similarity threshold, that is, whenthe matching result is that the matching is successful, the operation ofstoring the current image in the second storage unit 132 will not beperformed, so it is unnecessary to judge whether to store the currentimage in the second storage unit 132, which reduces the amount ofcalculations.

Before the current image is stored in the second storage unit 132, auniquely associated device target identifier may be assigned to thecurrent image, the device target identifier may be generated accordingto the time when the current image is stored in the second storage unit132, the flag number of the network camera and the random value, in thisway, not only the generated device target identifier is ensured to beunique, but also the time when the current image was taken and thecurrent image was taken by which network camera may also identified.

In the embodiment, the device target identifier for the image may be anunique identifier representing that the image is inside a device, whichmay use 64-bit characters, and a specific composition of the devicetarget identifier may be: device serial number+storage time+randomnumber. The application does not limit the specific composition ofdevice target identifier, which may be determined according to theactual situation.

Exemplarily, FIG. 2 is a schematic flow chart of the network camera inthe embodiment shown in FIG. 1 storing captured images in a secondstorage unit. As shown in FIG. 2 , the image storage process includesthe following steps: S21, an image sensor acquires a current image. S22,a processor judges whether a similarity value between the current imageand an image in the second storage unit is less than the firstsimilarity threshold indicated externally, if the similarity valuebetween the current image and the image in the second storage unit isnot less than the first similarity threshold indicated externally,executes S23 to send the current image to the server with a matchingsuccess message through the network communication interface; if thesimilarity value between the current image and the image in the secondstorage unit is less than the first similarity threshold indicatedexternally, executes S24 to send the current image to the server with amatching failure message through the network communication interface andS25 judges whether the similarity value is less than the secondsimilarity threshold indicated externally; if the similarity value isless than the second similarity threshold indicated externally, executesS26 to assign a uniquely associated device target identifier to thecurrent image and stores the current image in the second storage unit;if the similarity value is not less than the second similarity thresholdindicated externally, executes S27 to process the image according to theexternal indication.

In S22, the similarity value between the current image and the image inthe second storage unit may specifically be the maximum one of thesimilarity values between the current image and each image in the secondstorage unit. The embodiment of the present application does not limitthe specific implementation principle of S27, which may be determinedbased on the actual situation.

In the embodiment of the present application, the network camera usesthe image sensor to acquire the images of the monitored scene. On theone hand, the acquired images are stored in the first storage unit ofthe memory; on the other hand, the processor is configured for matchingthe current image acquired by the image sensor with images stored in thesecond storage unit of the memory, so as to obtain a similarity valuerepresenting the matching result, when the similarity value is less thanthe first similarity threshold but greater than the second similaritythreshold indicated externally, sending the current image to the serverwith a matching failure message through the network communicationinterface; and when the similarity value is less than the firstsimilarity threshold and less than the second similarity threshold,assigning a uniquely associated device target identifier to the currentimage while sending the current image to the server with a matchingfailure message through the network communication interface, and storingthe current image in the second storage unit.

Exemplarily, in a possible design of the present embodiment, theabove-mentioned processor 12 is specifically configured for acquiringimage quality of the current image when determining that the similarityvalue is less than the first similarity threshold and less than thesecond similarity threshold, and when the image quality is greater thana preset image quality, sending the current image to the server with amatching failure message through the network communication interface 14,assigning a uniquely associated device target identifier to the currentimage, and storing the current image in the second storage unit 132.

In some cases, when the image quality is poor, images with differentcontents may be wrongly determined as the same image, therefore, inorder to ensure the quality of the images stored in the second storageunit 132 and avoid errors in subsequent similarity determination,optionally, the processor 12 of the network camera may make qualitydetermination before storing the current image in the second storageunit 132, and store the current image in the second storage unit 132only when the image quality of the current image is greater than apreset image quality.

In the embodiment of the present application, the specific value of thepreset image quality is not limited, which may be customized accordingto the actual situation, for example, the value be determined accordingto the size of the storage space of the second storage unit 132, thebest quality of the image captured by the image sensor 11, etc., whichwill not be described in detail here.

In the embodiment of the present application, the quality of the imagestored in the second storage unit can be improved by judging the imagequality of the current image, and the accuracy of the result is higherwhen the image with high quality is used for similarity judgment, whichlays a foundation for the subsequent accurate similarity judgment.

Furthermore, in an embodiment of the present application, the processor12 is further configured for comparing the similarity value with a thirdsimilarity threshold indicated externally, acquiring the image qualityof the current image when the similarity value is greater than the thirdsimilarity threshold, and if the image quality is greater than the imagequality of a matching image corresponding to the current image,replacing the matching image in the second storage unit 132 with thecurrent image and taking a device target identifier for the matchingimage as the device target identifier for the current image, wherein thethird similarity threshold is greater than the first similaritythreshold.

The third similarity threshold indicated externally refers to a presetthird similarity threshold. Of course, the third similarity thresholdmay also be adjusted according to the instruction input by the user.

In the embodiment, for the first-time storing images, the processor 12may store all images that meet the second similarity threshold and thepreset image quality in the second storage unit 132. Over time, when thenetwork camera is in a scene with good light, the image quality of thecaptured current image may be greater than the matching image initiallystored in the second storage unit 132. At this time, if the similarityvalue between the current image and the matching image in the secondstorage unit 132 is greater than the third similarity threshold, thematching image in the second storage unit 132 may be replaced with thecurrent image in order to ensure that the image matching result can bedetermined quickly and accurately.

Optionally, in order to ensure that the device target identifier forimages uploaded to the server are consistent and avoid repeatedprocessing by the server, the device target identifier for the matchingimage is taken as the device target identifier for the current image.

Optionally, the third similarity threshold should be greater than thefirst similarity threshold, for example, in the present embodiment, whenthe first similarity threshold is 85%, the third similarity thresholdmay be 88%, 90%, etc. The embodiment of the present application does notlimit the specific values of the first similarity threshold and thethird similarity threshold, only if the condition that the thirdsimilarity threshold is greater than the first similarity threshold ismet.

In the network camera according to the embodiment of the presentapplication, the images in the second storage unit has an updatemechanism, which can further reduce the processing pressure of thenetwork camera and improve the accuracy of image comparison results.

Optionally, in another possible design of the present application, theprocessor 12 is further configured for determining a current storageamount of the second storage unit 132 and a first ratio of images in thesecond storage unit 132, and adjusting the second similarity thresholdbased on the current storage amount, the first ratio and a upper limitvalue for image storage of the second storage unit 132 indicatedexternally, the first ratio is used to indicate a ratio of the number oftarget objects corresponding to the current storage amount to thecurrent storage amount.

In the embodiment, both the first similarity threshold and the secondsimilarity threshold may be customized values, the second similaritythreshold may be associated with the storage amount of the secondstorage unit 132. Specifically, the processor 12 may dynamically adjustthe second similarity threshold based on the storage amount of thesecond storage unit 132, the first ratio of images in the second storageunit 132 and the upper limit value for image storage of the secondstorage unit 132 indicated externally, so that the number of the imagesstored in the second storage unit 132 does not exceed the storage upperlimit value.

The first ratio of images may also be characterized by the repetitionrate of image storage and accuracy of images, etc., a high first ratioindicates that the accuracy of storage is high, but the repetition rateof storage is low. Specifically, the first ratio represents a ratio ofthe total number of images with different targets to the total number ofimages stored in the second storage unit 132. For example, a total of100 images of persons are stored in the second storage unit 132, but the100 images actually only correspond to 90 different persons, so thefirst ratio is 90%, that is, the repetition rate of the images stored inthe second storage unit 132 is 10%. The upper limit value for imagestorage of the second storage unit 132 indicated externally mayspecifically be the number of different targets stored in the secondstorage unit 132. Optionally, the larger the storage amount of thesecond storage unit 132 is, the higher the second similarity thresholdis; the higher the first ratio of the images in the second storage unit132 is, the higher the second similarity threshold is; and the higherthe upper limit value for the image storage of the second storage unit132 indicated externally is, the higher the second similarity thresholdis.

Optionally, in the embodiment, the processor 12 is further configuredfor replacing an image with the lowest number of successful matches inthe second storage unit with the current image when the current storageamount is equal to the upper limit value for image storage.

When the current image needs to be stored in the second storage unit132, but the second storage unit 132 is full, the image with the lowestnumber of successful matches may be determined by analyzing the numberof successful matches for each image in the second storage unit 132, theimage with the lowest number of successful matches may be an image thatwas mistakenly stored in the second storage unit 132, or the targetcorresponding to the image does not often appear in the area monitoredby the network camera. Therefore, when the current storage amount of thesecond storage unit 132 is equal to the upper limit value for imagestorage, the image with the lowest number of successful matches in thesecond storage unit 132 may be replaced with the current image in orderto ensure that the current image can be stored in time.

Exemplarily, in another possible implementation of the embodiment, theprocessor 12 is further configured for when the similarity value isgreater than or equal to the first similarity threshold, determining acurrent time as a current successful matching time, and judging whethera time difference between the current successful matching time and thelatest successful matching time is greater than or equal to a presettime difference; if the time difference between the current successfulmatching time and the latest successful matching time is greater than orequal to the preset time difference, sending the current image to theserver with a matching success message through the network communicationinterface 14, updating the latest successful matching time to thecurrent successful matching time and adding 1 to the number ofsuccessful matches for the matching image corresponding to the currentimage; and if the time difference between the current successfulmatching time and the latest successful matching time is less than thepreset time difference, discarding the current image.

Optionally, in the embodiment of the present application, if thesimilarity value is greater than or equal to the first similaritythreshold, it means that there is an image in the second storage unit132 whose content is consistent with content of the current image. Atthis time, in order to avoid repeated uploading of content, whether thetime difference between the current successful matching time of a targetmatching image and the latest successful matching time of the targetmatching image meets a preset time relationship is determined, thetarget matching image is an image in the second storage unit 132 withthe largest similarity value to the current image.

As an example, if the time difference between the current successfulmatching time of the target matching image and the latest successfulmatching time of the target matching image is greater than or equal tothe preset time difference, it indicates that the image sensor 11 hasnot repeatedly sampled within the preset time period. At this time, onthe one hand, the processor 12 may upload the current image to theserver, specifically by sending the current image to the server throughthe network communication interface 14 with the matching successmessage. The matching success message is used to indicate that thecurrent image is successfully matched in the network camera, that is,there is a consistent image in the images previously captured by thenetwork camera, which can indicate that the current image has beenuploaded previously by the network camera; on the other hand, in thenetwork camera, the processor 12 may also increase the number ofsuccessful matches for the matching image corresponding to the currentimage by one in the second storage unit 132, so as to count the numberof successful matches for the matching image in the second storage unit132. The matching image corresponding to the current image refers to amatching image which is successfully matched with the current image, themore the number of successful matches for the matching imagecorresponding to the current image is, the more it can indicate that thecontent of the current image is frequently acquired.

As another example, if the time difference between the currentsuccessful matching time and the latest successful matching time is lessthan the preset time difference, it indicates that the image sensor 11repeatedly sampled within the preset time period. At this time, thecurrent image may not be processed or directly discarded.

The specific value of the preset time difference and its accuracy may bedetermined according to the actual situation, exemplarily, in theembodiment, the preset time difference may be 5s, 8s, 10s, and theaccuracy of the preset time difference may be 0.1s, etc.

Exemplarily, FIG. 3 is a schematic diagram of an implementation of thenetwork camera in the embodiment shown in FIG. 1 uploading the capturedimages to a server. As shown in FIG. 3 , the implementation may includethe following steps: S31, an image sensor acquires a current image; S32,a processor judges whether a similarity value between the current imageand an image in the second storage unit is less than a first similaritythreshold indicated externally, if the similarity value between thecurrent image and the image in the second storage unit is less than thefirst similarity threshold indicated externally, executes S33 to sendthe current image to the server with a matching failure message throughthe network communication interface; if the similarity value between thecurrent image and the image in the second storage unit is greater thanor equal to the first similarity threshold indicated externally,executes S34 to determine that the current time is the currentsuccessful matching time and executes S35 to judge whether the timedifference between the current successful matching time and the latestsuccessful matching time is greater than or equal to a preset timedifference, if the time difference between the current successfulmatching time and the latest successful matching time is less than thepreset time difference, executes S36 to discard the current image; ifthe time difference between the current successful matching time and thelatest successful matching time is greater than or equal to the presettime difference, executes S37 to send the current image to the serverwith a matching success message through the network communicationinterface and S38 to update the latest successful matching time to thecurrent successful matching time, and adds 1 to the number of successfulmatches for the matching image corresponding to the current image.

In S32, the similarity value between the current image and the image inthe second storage unit may specifically be the maximum similarity valuebetween the current image and each image in the second storage unit.

In the embodiment, when the similarity value is greater than or equal tothe first similarity threshold, repeated uploading of images to theserver can be avoided by comparing the time difference between thecurrent successful matching time and the latest successful matching timewith the preset time difference, thereby reducing the processing burdenof the server, and improving the stability of the video monitoringsystem.

Optionally, on the basis of the embodiment, the processor 12 is furtherconfigured for periodically obtaining the number of successful matchesfor each image in the second storage unit 132 within a preset timeperiod, retaining images whose number of successful matches is greaterthan or equal to a threshold number of successful matches indicatedexternally, and deleting images whose number of successful matches isless than the threshold number of successful matches indicatedexternally.

The threshold number of successful matches indicated externally may be apreset value or a value set by the user. The threshold number ofsuccessful matches indicated externally is positively correlated with apreset time period, for example, when the preset time period is 1 day,the threshold number of successful matches may be 1, 2 or 3 times, etc.;when the preset time period is 1 week, the threshold number ofsuccessful matches may be 5, 10 or 20 times.

In the embodiment, the network camera also has the function of regularlydeleting images in the second storage unit 132, so as to ensure that theimages stored in the second storage unit 132 are frequently used, thusincreasing the use frequency of the images stored in the second storageunit 132.

Specifically, functions such as adding, deleting image, and settingattribute for the second storage unit 132 is completely compatible withthe management of the storage unit under normal circumstances, thesecond storage unit may receive attribute values specified by usersthrough a human-computer interaction interface.

For example, FIG. 4 is an interface diagram of attribute setting of thesecond storage unit. As shown in FIG. 4 , in the embodiment, theinformation of the second storage unit may specifically be as follows:

-   -   name: second storage unit 1, first similarity threshold (i.e.,        successful matching threshold): 85%, remark information: none;    -   image storage settings:    -   enabling storing: disenabled (block unchecked indicates        disenabled, block checked indicates enabled), second similarity        threshold (i.e. similarity threshold of storing): 70%, image        quality threshold: 60%;    -   clear settings:    -   judgment period: days, period for counting statistics: 2 months,        minimum number of successful matches: 2.

The embodiment of the present application does not limit the specificvalues of the above parameters, which may be set according torequirements, and the above is only an example.

Exemplarily, FIG. 5 is a schematic diagram of an implementation ofdeleting an image in the second storage unit. As shown in FIG. 5 , theimplementation may include the following steps: S51, automatic deletionis started; S52, the processor periodically obtains the number ofsuccessful matches for each image in the second storage unit within apreset time period, S53, for each image in the second storage unit,judges whether the number of successful matches for the image is greaterthan or equal to the threshold number of successful matches indicatedexternally; if the number of successful matches for the image is greaterthan or equal to the threshold number of successful matches indicatedexternally, executes S54 to retain the image; if the number ofsuccessful matches for the image is less than the threshold number ofsuccessful matches indicated externally, executes S55 to delete theimage.

In the embodiment, by regularly deleting images in the second storageunit whose number of successful matches is less than the thresholdnumber of successful matches indicated externally, enough space in thesecond storage unit to store newly added images can be ensured, therebyreducing the abnormal situation caused by the second storage unit beingfull, improving the automation capability of the network camera andimproving the device competitiveness.

Exemplarily, in another possible design of the embodiment of the presentapplication, the processor 12 is further configured for sorting theimages in the second storage unit 132 according to an image sortinginstruction indicated externally in response to the image sortinginstruction, to obtain a sorting result, the image sorting instructionis used to indicate a sorting mode for the images in the second storageunit 132, and the sorting mode may be based on parameters such as numberof successful matches, successful matching time, storage time, etc., andthe images may be sorted in ascending or descending order according tothe size of the parameters thereof.

In the embodiment, the processor 12 may sort the images in the secondstorage unit 132 based on the image sorting instruction indicatedexternally to obtain a sorting result, so that the processor 12 cantransmit the sorting result to a display device connected with thenetwork camera, so that the display device presents the sorting result.

Exemplarily, the display device may have a human-computer interactioninterface, which can be controlled by a user, that is, the user mayinput or generate an image sorting instruction through thehuman-computer interaction interface, so as to indicate in what sortingmode the images in the second storage unit 132 may be displayed.

Exemplarily, since the device target identifier for each image in thesecond storage unit 132 is generated by the time when the image isstored in the second storage unit 132, the flag number of the networkcamera and a random value, and the processor 12 records the informationsuch as the number of successful matches for each image and a successfulmatching time each time, the network camera can at least provide any oneof the parameters such as the number of successful matches, a successfulmatching time, a storage time for sorting the images.

Exemplarily, in the embodiment, the processor 12 is further configuredfor, in response to a display instruction issued externally for a targetimage, obtaining a plurality of similar images having a similaritygreater than the first similarity threshold with a target image from thefirst storage unit 131 based on the display instruction, so as todisplay the target image and the plurality of similar images.

In the embodiment, the processor 12 may store all images captured by theimage sensor 11, since the images stored in the second storage unit 132are a subset of the images stored in the first storage unit 131,specifically, the first storage unit 131 stores all captured images, andthe second storage unit 132 stores images that meet the secondsimilarity threshold among all images, therefore, images in the firststorage unit 131 have a certain correspondence with images in the secondstorage unit 132. For example, an images in the first storage unit 131may carry an identifier of matching image that is an image in the secondstorage unit 132, and have a successful matching time, therefore, whenthe user sends the display instruction, the processor 12 may obtain apreset number of similar images from the first storage space based onthe identifier of the target image in the display instruction and theabove correspondence in response to the display instruction, so as todisplay the target image and multiple similar images.

Exemplarily, the network camera may be connected to a display device, sothat the display device may display images in the first storage unitand/or the second storage unit in the network camera.

Optionally, the display device has a human-computer interactioninterface, so that when the human-computer interaction interface of thedisplay device displays the image in the second storage unit 132, theuser may click on an image in the second storage unit 132 through thehuman-computer interaction interface, and the detailed information ofthe image may be displayed on the human-computer interaction interface.FIG. 6 is a schematic diagram showing detailed information of a targetimage in the second storage unit displayed by a display device. As shownin FIG. 6 , the human-computer interaction interface of the displaydevice may include function options such as preview, recycle (i.e.,deletion), picture, application, configuration, etc. For example, forthe application option, there are filtering conditions on the displayinterface for the second storage unit, and for a selected image, thehuman-computer interaction interface may also display detailedinformation of the image, i.e., image details. For example, imageattributes may include information such as the name, gender, province,and city of the person corresponding to the image, second similaritythreshold, storage time, total number of successful matches, etc., andshooting records may include matching time, acquaintance, image quality,etc.

Exemplarily, FIG. 7 is a schematic design diagram of a human-computerinteraction interface of a display device. As shown in FIG. 7 , in theembodiment, the human-computer interaction interface may be divided intoa plurality of areas, such as a preview area, a matching result, asnapshot display, an analysis area, a second storage unit, a deletedimage display, etc. The specific distribution of each area is shown inFIG. 7 and will not be repeated here.

The network camera according to the embodiment may process the imagescaptured in the monitored scene where the network camera located,automatically maintain the images in the second storage unit, therebyreducing the process of repeated processing, improving the automationdegree of the network camera and the accuracy of image comparisonresults. Further, the network camera may assign a uniquely associateddevice target identifier to each generated image, and images transmittedto the server also carry the device target identifier, in this way,accurate image comparison results can be obtained without image matchingby the server.

Furthermore, the present application further provides a video monitoringsystem. FIG. 8 is a schematic structural diagram of a video monitoringsystem according to an embodiment of the present application. As shownin FIG. 8 , the video monitoring system may include at least one networkcamera (for example, network camera 81 to network camera 8 n, where n isa positive integer) and a server 80, and a communication connectionbetween each network camera and the server 80 is established through anetwork.

Each of the at least one network camera may have the same configuration,and the implementation principle of each network camera is similar. Inthe present embodiment, an explanation is made to a network camera 81 ofthe at least one network camera.

As shown in FIG. 8 , the network camera 81 includes an image sensor 811,a first processor 812, a first memory 813 and a first networkcommunication interface 814. the first memory 813 includes a firststorage unit 8131 and a second storage unit 8132.

The image sensor 811 is configured for acquiring images of the monitoredscene.

The first storage unit 8131 is configured for storing all imagesacquired by the image sensor 811, and the second storage unit 8132 isconfigured for storing part of the images that is a subset of allimages, acquired by the image sensor 811.

The first processor 812 is configured for:

-   -   matching a current image acquired by the image sensor 811 with        an image stored in the second storage unit 8132 to obtain a        similarity value representing a matching result; comparing the        similarity value with a first similarity threshold indicated        externally and a second similarity threshold indicated        externally; when the similarity value is less than the first        similarity threshold but greater than the second similarity        threshold, sending the current image to a server 80 with a        matching failure message through the first network communication        interface 814; and when the similarity value is less than the        first similarity threshold and less than the second similarity        threshold, sending the current image to the server 80 with a        matching failure message through the first network communication        interface 814; and assigning a uniquely associated device target        identifier to the current image, and storing the current image        in the second storage unit 8132.

The first similarity threshold is greater than the second similaritythreshold, and the device target identifier for the current image isgenerated based on a time when the current image is stored in the secondstorage unit 8132, a flag number of the network camera 81 and a randomvalue.

With regard to the specific composition and the specific implementationprinciples of each component of the network camera 81 and other networkcameras, a reference may be made to the illustration shown in the FIGS.1 to 7 , and will not be repeated here.

As shown in FIG. 8 , the server 80 includes a second networkcommunication interface 821, a second processor 822 and a second memory823.

The second processor 822 is configured for receiving the matchingfailure message sent by the network camera through the second networkcommunication interface 821, judging whether there is an image in thesecond memory 823 whose target identifier is consistent with the targetidentifier for the current image, if there is no image in the secondmemory whose target identifier is consistent with the target identifierfor the current image, assigning a uniquely associated platform targetidentifier to the current image, and establishing a correspondencebetween the device target identifier and the matching failure message,and storing the platform target identifier and the correspondence; ifthere is an image in the second memory whose target identifier isconsistent with the target identifier for the current image, obtaining aplatform target identifier for the current image in the second memory823, establishing a mapping relationship between the device targetidentifier and the platform target identifier, and storing the currentimage and the mapping relationship in the second memory 823.

In the present embodiment, the server 80 may receive images sent by aplurality of network cameras through the second network communicationinterface 821, and in the present embodiment, the reception of the imagesent by the network camera 81 will be explained as an example.

Exemplarily, when the first processor 812 of the network camera 81 sendsthe current image captured by the image sensor 811 to the server 80 witha matching failure message through the first network communicationinterface 814, correspondingly, the server 80 may receive the currentimage through the second network communication interface 821.

In the present embodiment, since the current image received by theserver 80 is sent with a matching failure message, the second processor822 of the server 80 may determine that the network camera may not havesent a matching image for the current image before, but in order toavoid missing record of the matching image for the current image, thesecond processor 822 may perform similarity matching on the currentimage, and judge whether a matching image for the current image isstored in the server 80, that is, judge whether there is an image in thesecond memory 823 whose device target identifier is consistent with thedevice target identifier for the current image, and executecorresponding processing according to the judgment result.

As an example, if there is no image in the second memory 823 whosedevice target identifier is consistent with the device target identifierfor the current image, a correspondence between the device targetidentifier and the matching failure message is established to recordthat the content of the current image is not recorded in the server 80,so as to make a mark, so that relevant personnel can deal with it later.

As another example, if there is an image in the second memory 823 whosedevice target identifier is consistent with the device target identifierfor the current image, a platform target identifier for the matchingimage corresponding to the current image in the second memory 823 isobtained, a mapping relationship between the device target identifierand the platform target identifier is established, and the mappingrelationship is stored in the second memory 823.

In the present embodiment, although the matching image for the currentimage exists in the second memory 823, a correspondence between thematching image and the current image is not recorded, therefore, thesecond processor 822 may obtain the platform target identifier in thesecond memory 823 for the matching image, establish and store a mappingrelationship between the device target identifier for the current imageand the platform target identifier for the current image, so that whenthe network camera uploads the matching image for the current imageagain, the mapping relationship between the device target identifier forthe current image and the platform target identifier for the currentimage may be directly obtained, so as to be directly mapped to theprevious analysis result, thus decreasing the computational poweroccupation of the server 80 and reducing the processing burden of theserver 80.

Optionally, the platform target identifier in the present embodiment maybe the detailed information of the content of the image in the server,for example, the actual identity information of the person correspondingto the face in the face image, e.g., may be identity information such asID or name. The application does not limit the content of the platformtarget identifier, which may be set according to actual requirements.

Exemplarily, in a possible design of the present application, if thefirst processor 812 is further configured for sending the current imageto the server 80 with a matching success message through the firstnetwork communication interface 814 when the similarity value is greaterthan or equal to the first similarity threshold.

Correspondingly, the second processor 822 is further configured forreceiving the matching success message sent by the network camerathrough the second network communication interface 821, obtaining theplatform target identifier in the second memory 823 for the matchingimage corresponding to the current image, and taking the analysis resultof the platform target identifier as the analysis result of the currentimage.

In the present embodiment, if the current image received by the server80 is sent with the matching success message, the second processor 822of the server 80 may determine that the matching image for the currentimage may have been sent by the network camera before, and directlyobtain the platform target identifier in the second memory 823 for thematching image corresponding to the current image, and take the analysisresult of the platform target identifier as the analysis result of thecurrent image, without analyzing the current image again, therebydecreasing the computational power occupation of the server 80 and theprocessing tasks of the server 80 and reducing the processing burden ofthe server 80.

Furthermore, based on the embodiment, the second processor 822 isfurther configured for sending the platform target identifier for thecurrent image to the network camera through the second networkcommunication interface 821.

Correspondingly, the first processor 812 is further configured forreceiving the platform target identifier for the current image throughthe first network communication interface 814, and when the similarityvalue between the image captured by the image sensor 811 and the imagesstored in the second storage unit 8132 is greater than or equal to thefirst similarity threshold, sending the platform target identifier asthe device target identifier for the image to the server 80;

Correspondingly, the second processor 822 is further configured fordirectly obtaining the analysis result of the received image accordingto the platform target identifier for the image.

In the present embodiment, when the first processor 812 uploads thecurrent image with the matching success message, it is indicates thatthe matching image for the current image is stored in the second storageunit 8132 of the network camera, at this time, the second processor 822may send the obtained platform target identifier for the current imageto the network camera.

After receiving the platform target identifier, on the one hand, thenetwork camera may directly use the platform target identifier as thedevice target identifier for the matching image corresponding to thecurrent image, in this way, when the network camera uploads thesuccessfully matched image once again, the network camera may send theplatform target identifier as the device target identifier to the server80, so that the second processor 822 of the server 80 can directlyobtain the analysis result of the image according to the platform targetidentifier, without obtaining the platform target identifier having amapping relationship with the device target identifier, thus reducingthe workload of searching mapping relationship.

On the other hand, the network camera may retain the mappingrelationship between the platform target identifier and the devicetarget identifier, when matching a captured image successfully, thenetwork camera may determine the platform target identifier and thenupload the platform target identifier, which can also reduce theworkload of searching mapping relationship for the server 80 and reducethe processing burden of the server 80.

In the video monitoring system according to the embodiment of thepresent application, the network camera may self-maintain the images inthe second storage unit of the current point, form a point-specificsecond storage unit unique for the current point through long-termaccumulation, and form a mapping relationship between the device targetidentifier for an image in one device and the platform target identifierfor the image in the back-end large-scale memory at the back-end server.Once a subsequent received image is matched successfully, the serverdoes not need to match again, instead, map directly the device targetidentifier for the successfully matched image in the network camera,which not only reduces the processing pressure, but also avoids theincompatibility between the front-end network camera and the server andthe difficulty in maintaining the images in the second storage unit.

Exemplarily, in another example of the present application, FIG. 9 is aflow diagram of a first embodiment of a method for updating a facedatabase in a camera provided by the present application. As shown inFIG. 9 , in the embodiment, the method may include the following steps.

S91: a captured face image is acquired in response to a face captureinstruction.

In the present embodiment, the camera may acquire captured face imagesunder an external trigger. Exemplarily, the camera may acquire a facecapture instruction indicated externally, and acquire the captured faceimages using image sensor of the camera according to the face captureinstruction, and accordingly, the processor of the camera processes atleast one of the acquired captured face images.

S92: the captured face image is matched with any face image in a facedatabase according to the face database stored locally by the camera,and a similarity value of the captured face image is calculated.

At least two face images are stored in the face database, and each faceimage uniquely corresponds to an identification number; theidentification number is used to indicate a time when a face imagecorresponding to the identification number is stored in the facedatabase; and the identification number corresponds to a frequency valuethat is used to indicate number of successful matches for the face imagecorresponding to the identification number.

Exemplarily, the identification number may include a serialidentification number of the camera, a random value and a time when thecorresponding face image is stored in the face database.

In the present embodiment, the camera locally maintains a face database,in which part of images captured by the camera are stored. Usually, atleast two face images in the face database are obtained by acquiringfaces of different users. Specifically, each face image uniquelycorresponds to an identification number and a frequency value.

Therefore, when the camera acquires a new captured face image, thecaptured face image may be matched with the face images in the localface database to determine the similarity value of the captured faceimage, so as to judge whether the face database needs to be updated.

S93: when the similarity value of the captured face image is greaterthan a first threshold, a successful match is determined, and a faceimage in the face database with the highest similarity value to thecaptured face image, a first identification number corresponding to theface image and a frequency value corresponding to the firstidentification number are obtained.

In the present embodiment, when the similarity value of the capturedface image is greater than the first threshold, it indicates that thereis a face image in the face database whose content is basicallyconsistent with the content of the captured face image, therefore, inorder to avoid repeated storage of images with the same content, it isnecessary to determine the face image in the face database with thehighest similarity value to the captured face image, and accordingly,determine the first identification number corresponding to the faceimage with the highest similarity value and the frequency valuecorresponding to the first identification number.

Further, in the embodiment of the present application, after obtainingthe first identification number, the method further includes: sendingthe captured face image and the first identification number to theserver.

By sending the captured face image and the first identification numberto the server together, the server may determine the previous processingresult of the matching image corresponding to the captured face imageaccording to the identification number, thus simplifying the processingoperation of the server.

S94: when the frequency value corresponding to the first identificationnumber is less than a preset threshold, the face image corresponding tothe first identification number is deleted in the face database in thecamera, and the face database in the camera is updated.

In the present embodiment, the preset threshold corresponding to thefrequency value may be used as a judgement condition to indicate whetherthe face image is allowed to be stored in the face database. When thefrequency value corresponding to the first identification number is lessthan the preset threshold, it indicates that the face image may bemistakenly stored in the face database or the target corresponding tothe image does not often appear in the area where the camera is located.At this time, the face image corresponding to the first identificationnumber may be deleted in the face database in the camera and the facedatabase in the camera may be updated, thus ensuring the high accuracyof images stored in the face database.

Those skilled in the art should understand that the execution process ofstep S94 is triggered after the camera runs for a period of time, or isdirected to a scene where the remaining storage space of the facedatabase is insufficient, that is, less than a preset capacitythreshold.

Optionally, S94: deleting the face image corresponding to the firstidentification number in the face database in the camera and updatingthe face database in the camera when the frequency value correspondingto the first identification number is less than the preset thresholdincludes: in the case that the storage period of the face imagecorresponding to the first identification number is greater than apreset time and/or the remaining storage space of the face database inthe camera is less than a preset capacity threshold, when the frequencyvalue corresponding to the first identification number is less than thepreset threshold, deleting the face image corresponding to the firstidentification number in the face database in the camera and updatingthe face database in the camera.

Optionally, in a possible design of the present embodiment, before S94,the method may further execute the following operations first, and thenexecute S94. That is, after S93, to the frequency value corresponding tothe first identification number is 1 is added, and the frequency valueafter the calculation is recorded, so as to update the frequency valuecorresponding to the first identification number.

Accordingly, S94 may be replaced by the following steps:

-   -   deleting the face image corresponding to the first        identification number in the face database in the camera when        the calculated frequency value is less than the preset        threshold.

Comparing the calculated frequency value with the preset threshold,which facilities to improve the accuracy of judging whether the imagesstored in the database are accurate or not.

The method according to the embodiment of the present applicationincludes: acquiring a captured face image in response to a face captureinstruction; matching the captured face image with any face image in aface database according to the face database stored locally by thecamera, and calculating a similarity value of the captured face image;when the similarity value of the captured face image is greater than afirst threshold, determining a successful match, and obtaining a faceimage in the face database with the highest similarity value to thecaptured face image, a first identification number corresponding to theface image and a frequency value corresponding to the firstidentification number; deleting the face image corresponding to thefirst identification number in the face database in the camera andupdating the face database in the camera when the frequency valuecorresponding to the first identification number is less than a presetthreshold, thus ensuring the accuracy of images stored in the facedatabase and improving the accuracy of image comparison results.

Exemplarily, based on the embodiment, FIG. 10 is a flow diagram of asecond embodiment of a method for updating a face database in a cameraprovided by the present application. As shown in FIG. 10 , in thepresent embodiment, the method may further include the following steps.

S101: when the similarity value of the captured face image is less thana first threshold, whether the similarity value of the captured faceimage is less than a second threshold is judged, if the similarity valueof the captured face image is less than the second threshold, step S102is executed, if the similarity value of the captured face image isgreater than or equal to the second threshold, step S103 is executed.

It should be understood that S101 may be executed after S92, that is,when the similarity value of the captured face image is less than thefirst threshold, then the similarity value of the captured face image iscompared with the second threshold, and then corresponding operationsare executed according to the comparison result.

S102: the captured face image is stored in the face database in thecamera, a time when the captured face image is stored in the facedatabase in the camera is recorded, and a unique identification numberis assigned to the captured face image.

The second threshold is less than or equal to the first threshold.

In the present embodiment, when the similarity value of the capturedface image is less than the second threshold, it indicates that there isno image in the face database whose content is consistent with contentof the captured face image, at this time the captured face image may bestored in the face database in the camera. In addition, in order tofacilitate the subsequent maintenance of the face database, a time whenthe captured face image is stored in the face database in the camera maybe recorded, and a unique identification number may be assigned to thecaptured face image to uniquely identify the captured face image.

S103: the captured face image is not stored in the face database in thecamera, but sent to the server.

In the present embodiment, when the similarity value of the capturedface image is greater than or equal to the second threshold, itindicates that there is already an image in the face database whosecontent is consistent with content of the captured face image. In orderto avoid repeated storage of the face images, the captured face image isnot stored in the face database in the camera, but sent to the server,so that the server may perform corresponding processing on the capturedface image.

According to the method of the present embodiment, when the similarityvalue of the captured face image is less than the first threshold, thesimilarity value of the captured face image is compared with the secondthreshold, and when the similarity value of the captured face image isless than the second threshold, the captured face image is stored in theface database in the camera. The time when the captured face image isstored in the face database in the camera is recorded; and a uniqueidentification number is assigned to the captured face image.

Furthermore, in an embodiment of the present application, the method mayfurther include the following steps:

-   -   periodically acquiring frequency values corresponding to all        face images in the face database in the camera; and    -   deleting face images whose frequency value is less than a preset        frequency value, and updating the face database in the camera.

Furthermore, in an embodiment of the present application, the method mayfurther include: generating a data packet in response to a receiveddisplay instruction about the face database, the data packet is used todisplay the face image corresponding to the display instruction in theface database.

In the present embodiment, the camera may also acquire the displayinstruction about the face database sent externally, and sort and countthe images in the face database based on the display instruction togenerate a data packet, so that the camera may transmit the data packetto a display device connected to the camera, so that the display devicedisplays the face image corresponding to the display instruction in theface database.

The method for updating the face database in the camera according to theembodiment of the present application, the camera may maintain andupdate the local face database automatically, which reduces process ofthe repeated image processing, improves the automation degree of thecamera and the accuracy of image comparison results. Furthermore, thecamera may assign a unique identification number corresponding to eachface image, and the image transmitted to the server also carries theidentification number.

The camera in the embodiment, i.e., the network camera in theabove-mentioned embodiments, and the face database in the presentapplication is also the second storage unit of the memory in theabove-mentioned embodiments. For the detailed description in presentembodiment, please refer to the record in the above embodiments, whichwill not be repeated here.

Exemplarily, in another embodiment of the present application, FIG. 11is a flow diagram of an embodiment of a method for associating a facedatabase in a camera with a face database in a server provided by thepresent application. As shown in FIG. 11 , in the present embodiment,the method may include the following steps.

S111: a camera acquires a captured face image in response to a facecapture instruction.

S112: the camera matches the captured face image with any face image inthe face database stored locally by the camera according to the facedatabase, and calculates a similarity value of the captured face image.

At least two face images are stored in the face database, and eachcaptured face image uniquely corresponds to an identification number;the identification number is used to indicate a time when a face imagecorresponding to the identification number is stored in the facedatabase in the camera. Optionally, the identification numbercorresponds to a frequency value that is used to indicate the number ofsuccessful matches for the face image corresponding to theidentification number.

S113: when the similarity value of the captured face image is greaterthan a first threshold, the camera determines a successful match, andobtains a face image with the highest similarity value to the capturedface image in the face database, and the first identification numbercorresponding to the face image.

S114: the camera sends the first identification number and the capturedface image to the server.

S115: according to the received first identification number, the servercompares the captured face image with the face database in the server inresponse to the first identification number being received for the firsttime.

Each face image in the face database in the server uniquely correspondsto a second identification number.

S116: after the captured face image is successfully compared with faceimages in the server, the server obtains a face image in the server withthe highest similarity value to the captured face image and thecorresponding second identification number.

S117: the server creates an association relationship between the firstidentification number and the second identification number, theassociation relationship is used to associate the face database in thecamera with the face database in the server.

In a possible implementation, the method for associating the facedatabase in the camera with the face database in the server furtherincludes: when storage time of a face image in the face database islonger than a first preset time and the number of successful matchescorresponding to the identification number of the face image is lessthan a preset threshold, deleting the face image in the face database,and/or when remaining storage space of the face database is less than apreset capacity threshold, deleting a face image for which the number ofsuccessful matches corresponding to the identification number is lessthan the preset threshold in the face database.

In the embodiment of the application, after acquiring a captured faceimage, the camera matches the captured face image with any face image inthe face database stored locally by the camera according to the facedatabase; calculates a similarity value of the captured face image; whenthe similarity value of the captured face image is greater than a firstthreshold, determines a successful match; and obtains a face image withthe highest similarity value to the captured face image in the facedatabase, and the first identification number corresponding to the faceimage, and sends the first identification number and the captured faceimage to the server, correspondingly, the server compares the capturedface image with the face database in the server according to thereceived first identification number in response to the firstidentification number being received for the first time, and after thecaptured face image is successfully compared with face images in theserver, obtains a face image in the server with the highest similarityvalue to the captured face image and a corresponding secondidentification number, and creates an association relationship betweenthe first identification number and the second identification number,the association relationship is used to associate the face database inthe camera with the face database in the server.

It should be understood that the specific implementation of some stepsin the present embodiment can be referred to the description in any ofthe above embodiments, and all the details in the present embodiment canbe referred to the description in the above embodiments, which will notbe repeated here.

Finally, it should be noted that the above embodiments are only used toillustrate the technical solution of the present application, but not tolimit it; although the application has been described in detail withreference to the foregoing embodiments, those skilled in the art shouldunderstand that the technical solutions described in the foregoingembodiments can still be modified, or some or all of the technicalfeatures can be equivalently replaced; and these modifications orreplacements do not make the essence of the corresponding technicalsolutions deviate from the scope of the technical solutions of eachembodiment of the present application.

The above are only preferred embodiments of this application, and shouldnot intended to limit present application. Any modification, equivalentreplacement, improvement, etc. made within the spirit and principle ofthe present application shall be included in the scope of protection ofthe present application.

What is claimed is:
 1. A network camera comprising an image sensor, aprocessor, a memory and a network communication interface; the memorycomprises a first storage unit and a second storage unit; the imagesensor is configured for acquiring images of a monitoring scene; thefirst storage unit is configured for storing all images acquired by theimage sensor, and the second storage unit is configured for storing apart of the images acquired by the image sensor, the part of the imagesis a subset of all images; the processor is configured for: matching acurrent image acquired by the image sensor with an image stored in thesecond storage unit to obtain a similarity value representing a matchingresult, and comparing the similarity value with a first similaritythreshold indicated externally and a second similarity thresholdindicated externally; when the similarity value is less than the firstsimilarity threshold but greater than the second similarity threshold,sending the current image to a server with a matching failure messagethrough the network communication interface; when the similarity valueis less than the first similarity threshold and less than the secondsimilarity threshold, sending the current image to the server with amatching failure message through the network communication interface,assigning a uniquely associated device target identifier to the currentimage, and storing the current image in the second storage unit;wherein, the first similarity threshold is greater than the secondsimilarity threshold, the device target identifier is generated based ona time when the current image is stored in the second storage unit, aflag number of the network camera and a random value.
 2. The networkcamera according to claim 1, wherein the processor is specificallyconfigured for acquiring an image quality of the current image when thesimilarity value is less than the first similarity threshold and lessthan the second similarity threshold, and when the image quality isgreater than a preset image quality, sending the current image to aserver with a matching failure message through the network communicationinterface, assigning a uniquely associated device target identifier tothe current image, and storing the current image in the second storageunit.
 3. The network camera according to claim 1, wherein the processoris further configured for comparing the similarity value with a thirdsimilarity threshold indicated externally, acquiring image quality ofthe current image when the similarity value is greater than the thirdsimilarity threshold, and when the image quality is greater than animage quality of a matching image corresponding to the current image,replacing the matching image in the second storage unit with the currentimage and taking a device target identifier for the matching image asthe device target identifier for the current image, wherein the thirdsimilarity threshold is greater than the first similarity threshold. 4.The network camera according to claim 1, wherein the processor isfurther configured for determining a current storage amount of thesecond storage unit and a first ratio of images in the second storageunit, and adjusting the second similarity threshold according to thecurrent storage amount, the first ratio and a upper limit value forimage storage of the second storage unit indicated externally, whereinthe first ratio is used to indicate a ratio of the number of targetobjects corresponding to the current storage amount to the currentstorage amount; the processor is further configured for replacing animage with the lowest number of successful matches in the second storageunit with the current image when the current storage amount is equal tothe upper limit value for image storage.
 5. The network camera accordingto claim 1, wherein the processor is further configured for, when thesimilarity value is greater than or equal to the first similaritythreshold, determining a current time as a current successful matchingtime, judging whether a time difference between the current successfulmatching time and the latest successful matching time is greater than orequal to a preset time difference, if the time difference between thecurrent successful matching time and the latest successful matching timeis greater than or equal to a preset time difference, sending thecurrent image to the server with a matching success message through thenetwork communication interface, and updating the latest successfulmatching time to the current successful matching time, and increasingthe number of successful matches for the matching image corresponding tothe current image by one.
 6. The network camera according to claim 5,wherein the processor is further configured for periodically obtainingthe number of successful matches for each image in the second storageunit within a preset time period, retaining an image whose number ofsuccessful matches is greater than or equal to a threshold number ofsuccessful matches indicated externally, and deleting an image whosenumber of successful matches is less than the threshold number ofsuccessful matches indicated externally.
 7. The network camera accordingto claim 1, wherein the processor is further configured for sorting theimages in the second storage unit according to an image sortinginstruction indicated externally in response to the image sortinginstruction, to obtain a sorting result, the image sorting instructionis used to indicate a sorting mode for the images in the second storageunit, and the sorting mode comprises any one of the following: number ofsuccessful matches, successful matching time and storage time.
 8. Thenetwork camera according to claim 7, wherein the processor is furtherconfigured for, in response to a display instruction for a target imageissued externally, obtaining a plurality of similar images whosesimilarity with the target image is greater than the first similaritythreshold from the first storage unit based on the display instruction,so as to display the target image and the plurality of similar images.9. A video monitoring system comprising: at least one network camera anda server, a communication connection between each camera and the serveris established through a network; for any network camera in the at leastone network device, the network camera comprises an image sensor, afirst processor, a first memory and a first network communicationinterface, wherein the first memory comprises a first storage unit and asecond storage unit; the image sensor is configured for acquiring imagesof monitored scenes; the first storage unit is configured for storingall images acquired by the image sensor, and the second storage unit isconfigured for storing a part of the images acquired by the imagesensor, the part of the images is a subset of all images; the firstprocessor is configured for: matching a current image acquired by theimage sensor with an image stored in the second storage unit to obtain asimilarity value representing a matching result, comparing thesimilarity value with a first similarity threshold indicated externallyand a second similarity threshold indicated externally, and when thesimilarity value is less than the first similarity threshold but greaterthan the second similarity threshold, sending the current image to aserver with a matching failure message through the first networkcommunication interface, and when the similarity value is less than thefirst similarity threshold and less than the second similaritythreshold, sending the current image to the server with the matchingfailure message through the network communication interface, assigning auniquely associated device target identifier to the current image, andstoring the current image in the second storage unit, wherein, the firstsimilarity threshold is greater than the second similarity threshold,and the device target identifier is generated based on a time when thecurrent image is stored in the second storage unit, a flag number of thenetwork camera and a random value; wherein the server comprises a secondnetwork communication interface, a second processor and a second memory;the second processor is configured for receiving the matching failuremessage sent by the network camera through the second networkcommunication interface, judging whether there is an image in the secondmemory whose device target identifier is consistent with the devicetarget identifier for the current image, if there is no image in thesecond memory whose device target identifier is consistent with thedevice target identifier for the current image, assigning a uniquelyassociated platform target identifier to the current image, establishinga correspondence between the device target identifier and the matchingfailure message, and storing the platform target identifier and thecorrespondence; if there is an image in the second memory whose devicetarget identifier is consistent with the device target identifier forthe current image, obtaining a platform target identifier for thematching image corresponding to the current image in the second memory,establishing a mapping relationship between the device target identifierand the platform target identifier, and storing the mapping relationshipin the second memory.
 10. A method for updating a face database in acamera comprising: acquiring a captured face image in response to a facecapture instruction; matching the captured face image with any faceimage in the face database stored locally by the camera according to theface database, and calculating a similarity value of the captured faceimage; wherein, at least two face images are stored in the facedatabase, and each face image uniquely corresponds to an identificationnumber; wherein the identification number is used to indicate a timewhen the face image corresponding to the identification number is storedin the face database; and the identification number corresponds to afrequency value that is used to indicate the number of successfulmatches for the face image corresponding to the identification number;when the similarity value of the captured face image is greater than afirst threshold, determining a successful match, and obtaining a faceimage with the highest similarity value to the captured face image inthe face database, a first identification number corresponding to theface image and a frequency value corresponding to the firstidentification number; when the frequency value corresponding to thefirst identification number is less than a preset threshold, deletingthe face image corresponding to the first identification number in theface database in the camera to update the face database in the camera.11. The method according to claim 10, wherein the method furthercomprises: when the similarity value of the captured face image is lessthan the first threshold, comparing the similarity value of the capturedface image with a second threshold; when the similarity value of thecaptured face image is less than the second threshold, storing thecaptured face image in the face database in the camera, recording a timewhen the captured face image is stored in the face database in thecamera, and assigning a unique identification number to the capturedface images; wherein the second threshold is less than or equal to thefirst threshold.
 12. The method according to claim 11, wherein themethod further comprises: when the similarity value of the captured faceimage is greater than the second threshold, sending the captured faceimage to a server, without storing the captured face image in the facedatabase in the camera.
 13. The method according to claim 10, whereinthe identification number comprises a serial identification number ofthe camera, a random value and a time when the corresponding face imageis stored in the face database.
 14. The method according to claim 13,wherein before deleting the face image corresponding to the firstidentification number in the face database in the camera when thefrequency value corresponding to the first identification number is lessthan the preset threshold, the method comprises: performing add-oneoperation on the frequency value corresponding to the firstidentification number by one, and recording the frequency value afterthe operation; accordingly, when the frequency value corresponding tothe first identification number is less than the preset threshold,deleting the face image corresponding to the first identification numberin the face database in the camera comprises: deleting the face imagecorresponding to the first identification number in the face database inthe camera when the frequency value after the operation is less than thepreset threshold.